axios send request with cookies

37

server: 
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
res.setHeader('Access-Control-Allow-Credentials',true);

client(axios):
axios.defaults.withCredentials = true;
axios.get('some api url', {withCredentials: true});

Comments

Submit
0 Comments